package net.togogo.egouweb1238.core.dao.area;

import java.util.List;

import net.togogo.egouweb1238.core.domain.area.Town;
import net.togogo.egouweb1238.core.query.area.TownQuery;


public interface TownDao {

	/**
	 * 添加
	 * @param town
	 */
	public Integer addTown(Town town);

	/**
	 * 根据主键查找
	 * @param townQuery
	 */
	public Town getTownById(Integer id);

	/**
	 * 根据主键批量查找
	 * @param townQuery
	 */
	public List<Town> getTownsByIds(List<Integer> idList);

	/**
	 * 根据主键删除
	 * @param townQuery
	 */
	public Integer deleteById(Integer id);

	/**
	 * 根据主键批量删除
	 * @param townQuery
	 */
	public Integer deleteByIds(List<Integer> idList);

	/**
	 * 根据主键更新
	 * @param townQuery
	 */
	public Integer updateTownById(Town town);

	/**
	 * 分页查询
	 * @param townQuery
	 */
	public List<Town> getTownListWithPage(TownQuery townQuery);

	/**
	 * 集合查询
	 * @param townQuery
	 */
	public List<Town> getTownList(TownQuery townQuery);
	
	/**
	 * 总条数
	 * @param townQuery
	 */
	public int getTownListCount(TownQuery townQuery);
}
